import API from "@/utils/request";

export function getPageBanner({pageNum,pageSize}){
    return API.get('/banner/page',{
        params:{
            pageNum,
            pageSize
        }
    })
}

export function getAllBanner(){
    return API.get('/banner')
}

export function getBannerById(id){
    return API.get(`/banner/${id}`)
}

export function saveBanner(banner){
    return API.post('/banner',banner)
}

export function updateBanner(banner){
    return API.put('/banner',banner)
}

export function removeBanner(id){
    return API.delete(`/banner/${id}`)
}